package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the BACKRECORD database table.
 * 
 */
@Entity
@NamedQuery(name="Backrecord.findAll", query="SELECT b FROM Backrecord b")
public class Backrecord implements Serializable {
	public Backrecord(BigDecimal brCoId, String brCoName, String brIfTicket, BigDecimal brMoney, String brOwner,
			String brPayWay, BigDecimal brPeriod, String brRemarks, Date brTime) {
		super();
		this.brCoId = brCoId;
		this.brCoName = brCoName;
		this.brIfTicket = brIfTicket;
		this.brMoney = brMoney;
		this.brOwner = brOwner;
		this.brPayWay = brPayWay;
		this.brPeriod = brPeriod;
		this.brRemarks = brRemarks;
		this.brTime = brTime;
	}

	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(initialValue=1,allocationSize=1,name="BACKRECORD_BRID_GENERATOR", sequenceName="SEQ_4")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="BACKRECORD_BRID_GENERATOR")
	@Column(name="BR_ID")
	private long brId;

	public Backrecord(long brId, BigDecimal brCoId, String brCoName, String brIfTicket, BigDecimal brMoney,
			String brOwner, String brPayWay, BigDecimal brPeriod, String brRemarks, Date brTime) {
		super();
		this.brId = brId;
		this.brCoId = brCoId;
		this.brCoName = brCoName;
		this.brIfTicket = brIfTicket;
		this.brMoney = brMoney;
		this.brOwner = brOwner;
		this.brPayWay = brPayWay;
		this.brPeriod = brPeriod;
		this.brRemarks = brRemarks;
		this.brTime = brTime;
	}

	@Column(name="BR_CO_ID")
	private BigDecimal brCoId;

	@Column(name="BR_CO_NAME")
	private String brCoName;

	@Column(name="BR_IF_TICKET")
	private String brIfTicket;

	@Column(name="BR_MONEY")
	private BigDecimal brMoney;

	@Column(name="BR_OWNER")
	private String brOwner;

	@Column(name="BR_PAY_WAY")
	private String brPayWay;

	@Column(name="BR_PERIOD")
	private BigDecimal brPeriod;

	@Column(name="BR_REMARKS")
	private String brRemarks;

	@Temporal(TemporalType.DATE)
	@Column(name="BR_TIME")
	private Date brTime;

	//bi-directional many-to-one association to ConstactOrder
	@ManyToOne
	@JoinColumn(name="CO_ID")
	private ConstactOrder constactOrder;

	public Backrecord() {
	}

	public long getBrId() {
		return this.brId;
	}

	public void setBrId(long brId) {
		this.brId = brId;
	}

	public BigDecimal getBrCoId() {
		return this.brCoId;
	}

	public void setBrCoId(BigDecimal brCoId) {
		this.brCoId = brCoId;
	}

	public String getBrCoName() {
		return this.brCoName;
	}

	public void setBrCoName(String brCoName) {
		this.brCoName = brCoName;
	}

	public String getBrIfTicket() {
		return this.brIfTicket;
	}

	public void setBrIfTicket(String brIfTicket) {
		this.brIfTicket = brIfTicket;
	}

	public BigDecimal getBrMoney() {
		return this.brMoney;
	}

	public void setBrMoney(BigDecimal brMoney) {
		this.brMoney = brMoney;
	}

	public String getBrOwner() {
		return this.brOwner;
	}

	public void setBrOwner(String brOwner) {
		this.brOwner = brOwner;
	}

	public String getBrPayWay() {
		return this.brPayWay;
	}

	public void setBrPayWay(String brPayWay) {
		this.brPayWay = brPayWay;
	}

	public BigDecimal getBrPeriod() {
		return this.brPeriod;
	}

	public void setBrPeriod(BigDecimal brPeriod) {
		this.brPeriod = brPeriod;
	}

	public String getBrRemarks() {
		return this.brRemarks;
	}

	public void setBrRemarks(String brRemarks) {
		this.brRemarks = brRemarks;
	}

	public Date getBrTime() {
		return this.brTime;
	}

	public void setBrTime(Date brTime) {
		this.brTime = brTime;
	}

	public ConstactOrder getConstactOrder() {
		return this.constactOrder;
	}

	public void setConstactOrder(ConstactOrder constactOrder) {
		this.constactOrder = constactOrder;
	}

}